<?php
session_start();

$search_air = isset($_SESSION["search_air"]) ? $_SESSION["search_air"] : array();
$search_air_ve = isset($_SESSION["search_air_ve"]) ? $_SESSION["search_air_ve"] : array();
$subNav = array();

set_include_path("../");
include("inc/essentials.php");
include("model/airport.php");
?>
<script>
    $mainNav.set("home");
    $(document).ready(function(e) {
        $('span#view_detailt').click(function() {
            var obj = $(this);
            var hide_content = obj.parent().parent().find('.hide_content');
            if (hide_content.css('display') == 'none') {
                hide_content.stop().show(500);
            } else {
                hide_content.stop().hide(500);
            }
        });
    });
</script>
<div id="bdwrapper">
    <div id="leftcontent">
        <div class="backcontent"><a href="javascript:history.back()"><img src="img/icons/backicon.png" /><span>Tìm kiếm</span></a></div>
        <div class="contentnews">
            <span style="display:block; padding-bottom:10px; margin-top:5px; margin-left:10px; font-weight:bold; color:red; font-size:28px">Giá đã bao gồm thuế và phí</span>
            <?php if (!isset($_GET["router"]) && $_GET["router"] == NULL) { ?>
                <?php if (empty($search_air)) { ?>
                    <div class="sky_left_section">
                        <span style="color:#FF7B0F; margin-left:15px; font-weight:bold; font-size:20px">Không có chuyến bay nào.</span> 
                    </div>
                <?php } else { ?>
                    <?php foreach ($search_air as $_search_air) : ?>
                        <div class="sky_left_section">
                            <span style="color:#FF7B0F; margin-left:15px; font-weight:bold; font-size:20px">
                                <?php
                                $air_go = Air_Port::findAirportCodeId($_search_air["airport_code_go"]);
                                foreach ($air_go as $_air_go) {
                                    ?>
                                    <?php echo $_air_go["title"] ?>
                                <?php } ?>
                            </span> 
                            <span style="font-weight:bold; color:#666; font-size:16px;">đi</span> <span style="color:#FF7B0F; font-weight:bold; font-size:20px">
                                <?php
                                $air_to = Air_Port::findAirportCodeId($_search_air["airport_code_to"]);
                                foreach ($air_to as $_air_to) {
                                    ?>
                                    <?php echo $_air_to["title"] ?>
                                <?php } ?>
                            </span> <span class="dsb p5"></span>
                            <span style="font-weight:bold; margin-left:10px; color:#666; font-size:16px;">bay ngày</span> <span style="color:#143B85; font-size:20px; font-weight:bold;">
                                <?php echo date("d-m-Y", $_search_air["ngay_di"]); ?>
                            </span>
                            <span class="dsb p5"></span>
                            <div class="sky_schedule">
                                <div class="content">
                                    <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                    <span class="flight_code"><?php echo $_search_air["id"] ?></span>
                                    <span class="time"><?php echo date("H:i", $_search_air["ngay_di"]) ?> - <?php echo date("H:i", $_search_air["ngay_den"]) ?></span>
                                    <span class="price"><?php echo $_search_air["gia_ve_nguoi_lon"] ?> VNĐ</span>
                                    <span class="detailt" id="view_detailt">Xem Chi Tiết</span>
                                    <span class="chosen">
                                        <a <?php metroLink("searchinfo.php?id={$_search_air["id"]}") ?> title="Tiếp theo -&gt; xác nhận đơn hàng"><input type="radio" name="chosen"><span>Chọn</span></a>
                                    </span>
                                    <div class="clear"></div>
                                </div>
                                <div class="hide_content">
                                    <div class="three">
                                        Từ <strong><?php echo $_air_go["title"] ?></strong>, Việt Nam<br>
                                        Sân Bay: <strong>
                                            <?php
                                            $air_g = Air_Port::findAirportByCodeId($_search_air["airport_code_go"]);
                                            foreach ($air_g as $_air_g) {
                                                echo $_air_g["title"];
                                            }
                                            ?></strong><br>
                                        <strong><?php echo date("H:i", $_search_air["ngay_di"]) ?></strong><!--, 24-11-2013-->
                                    </div>

                                    <div class="three">
                                        Tới <strong><?php echo $_air_to["title"] ?></strong>, Việt Nam<br>
                                        Sân Bay: <strong>
                                            <?php
                                            $air_t = Air_Port::findAirportByCodeId($_search_air["airport_code_to"]);
                                            foreach ($air_t as $_air_t) {
                                                echo $_air_t["title"];
                                            }
                                            ?></strong><br>
                                        <strong><?php echo date("H:i", $_search_air["ngay_den"]) ?></strong><!--, 24-11-2013-->
                                    </div>

                                    <div class="three">
                                        <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                        <span><?php
                                            $air = Air_Port::findAirLineById($_search_air["airlines_id"]);
                                            foreach ($air as $_air) {
                                                echo $_air["title"];
                                            }
                                            ?></span><br>
                                        <strong><?php echo $_search_air["ma_may_bay"] ?></strong><br>
                                        <span>Loại vé: <strong><?php echo $_search_air["loai_ve"] ?></strong></span>
                                    </div>
                                    <div class="clear" style="border-bottom:1px dashed #CCC; padding-bottom:5px; margin-bottom:5px;"></div>
                                    <table class="tb0 red" width="100%">
                                        <tbody><tr>
                                                <td width="25%"><strong class="tlcl1">Loại hành khách</strong></td>
                                                <td width="15%"><strong class="tlcl1">Số lượng vé</strong></td>
                                                <td width="20%"><strong class="tlcl1">Giá mỗi vé</strong></td>
                                                <td width="20%"><strong class="tlcl1">Thuế &amp; Phí mỗi vé</strong></td>
                                                <td width="20%"><strong class="tlcl1">Tổng giá</strong></td>
                                            </tr>
                                            <tr>
                                                <td>Người lớn</td>
                                                <td><?php echo $_SESSION["nguoilon"] ?></td>
                                                <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format($_search_air["phi_nguoi_lon"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["nguoilon"]) ?> VNĐ</strong></td>
                                            </tr>
                                            <?php if (isset($_SESSION["treem"]) && $_SESSION["treem"] > 0) { ?>
                                                <tr>
                                                    <td>Trẻ em</td>
                                                    <td><?php echo $_SESSION["treem"] ?></td>
                                                    <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format($_search_air["gia_ve_tre_em"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format(($_search_air["phi_tre_em"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["treem"]) ?> VNĐ</strong></td>
                                                </tr>
                                            <?php } ?>
                                            <?php if (isset($_SESSION["embe"]) && $_SESSION["embe"] > 0) { ?>
                                                <tr>
                                                    <td>Em bé</td>
                                                    <td><?php echo $_SESSION["embe"] ?></td>
                                                    <td><strong><?php echo number_format($_search_air["gia_ve_em_be"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format($_search_air["phi_em_be"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["embe"]) ?> VNĐ</strong></td>
                                                </tr>
                                            <?php } ?>
                                        </tbody></table>
                                    <strong class="tlcl2">Điều kiện hành lý</strong>
                                    <?php
                                    $air = Air_Port::findAirLineById($_search_air["airlines_id"]);
                                    foreach ($air as $_air) {
                                        ?>
                                        <table class="tb0" width="100%">
                                            <tbody><tr>
                                                    <td width="30%">Hành lý xách tay</td>
                                                    <td width="70%"><?php echo $_air["hanh_ly_xach_tay"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td>Hàng lý ký gửi</td>
                                                    <td>Vui lòng chọn ở bước sau.</td>
                                                </tr>
                                            </tbody></table>
                                        <strong class="tlcl2">Điều kiện về vé</strong>
                                        <table width="100%" class="tb0">
                                            <tbody><tr>
                                                    <td width="30%">Hoàn Vé</td>
                                                    <td width="70%"><?php echo $_air["hoan_ve"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Đổi Tên Hành Khách</td>
                                                    <td width="70%"><?php echo $_air["doi_ten"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Đổi Hành Trình</td>
                                                    <td width="70%"><?php echo $_air["doi_hanh_trinh"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Đổi Ngày Giờ Chuyến Bay</td>
                                                    <td width="70%"><?php echo $_air["doi_ngay_gio"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Bảo lưu</td>
                                                    <td width="70%"><?php echo $_air["bao_luu"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Thời hạn thay đổi </td>
                                                    <td width="70%"><?php echo $_air["thoi_gian_doi"] ?></td>
                                                </tr>
                                                <tr>
                                                    <td width="30%">Thay đổi chuyến bay</td>
                                                    <td width="70%"><?php echo $_air["doi_chuyen_bay"] ?></td>
                                                </tr>
                                            </tbody></table>
                                    <?php } ?>
                                </div>
                            </div>
                        </div>    
                    <?php endforeach; ?>
                <?php } ?>

                <!-------------------- Chuyen bay ve ------------------------------------>
                <?php if (isset($_SESSION["search_air_ve"])) { ?>
                    <?php if (empty($search_air_ve)) { ?>
                        <div class="sky_left_section">
                            <span style="color:#FF7B0F; margin-left:15px; font-weight:bold; font-size:20px">Không có chuyến bay nào.</span> 
                        </div>
                    <?php } else { ?>

                        <?php
                        foreach ($search_air_ve as $_search_air_ve) :
                            ?>
                            <div class="sky_left_section">
                                <span style="color:#FF7B0F; margin-left:15px; font-weight:bold; font-size:20px">
                                    <?php
                                    $air_go = Air_Port::findAirportCodeId($_search_air_ve["airport_code_go"]);
                                    foreach ($air_go as $_air_go) {
                                        ?>
                                        <?php echo $_air_go["title"] ?>
                                    <?php } ?>
                                </span> 
                                <span style="font-weight:bold; color:#666; font-size:16px;">đi</span> <span style="color:#FF7B0F; font-weight:bold; font-size:20px">
                                    <?php
                                    $air_to = Air_Port::findAirportCodeId($_search_air_ve["airport_code_to"]);
                                    foreach ($air_to as $_air_to) {
                                        ?>
                                        <?php echo $_air_to["title"] ?>
                                    <?php } ?>
                                </span> <span class="dsb p5"></span>
                                <span style="font-weight:bold; margin-left:10px; color:#666; font-size:16px;">bay ngày</span> <span style="color:#143B85; font-size:20px; font-weight:bold;">
                                    <?php echo date("d-m-Y", $_search_air_ve["ngay_di"]); ?>
                                </span>
                                <span class="dsb p5"></span>
                                <div class="sky_schedule">
                                    <div class="content">
                                        <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                        <span class="flight_code"><?php echo $_search_air_ve["id"] ?></span>
                                        <span class="time"><?php echo date("H:i", $_search_air_ve["ngay_di"]) ?> - <?php echo date("H:i", $_search_air_ve["ngay_den"]) ?></span>
                                        <span class="price"><?php echo $_search_air_ve["gia_ve_nguoi_lon"] ?> VNĐ</span>
                                        <span class="detailt" id="view_detailt">Xem Chi Tiết</span>
                                        <span class="chosen">
                                            <a <?php metroLink("searchinfo.php?id={$_search_air_ve["id"]}") ?> title="Tiếp theo -&gt; xác nhận đơn hàng"><input type="radio" name="chosen"><span>Chọn</span></a>
                                        </span>
                                        <div class="clear"></div>
                                    </div>
                                    <div class="hide_content">
                                        <div class="three">
                                            Từ <strong><?php echo $_air_go["title"] ?></strong>, Việt Nam<br>
                                            Sân Bay: <strong>
                                                <?php
                                                $air_g = Air_Port::findAirportByCodeId($_search_air_ve["airport_code_go"]);
                                                foreach ($air_g as $_air_g) {
                                                    echo $_air_g["title"];
                                                }
                                                ?></strong><br>
                                            <strong><?php echo date("H:i", $_search_air_ve["ngay_di"]) ?></strong><!--, 24-11-2013-->
                                        </div>

                                        <div class="three">
                                            Tới <strong><?php echo $_air_to["title"] ?></strong>, Việt Nam<br>
                                            Sân Bay: <strong>
                                                <?php
                                                $air_t = Air_Port::findAirportByCodeId($_search_air_ve["airport_code_to"]);
                                                foreach ($air_t as $_air_t) {
                                                    echo $_air_t["title"];
                                                }
                                                ?></strong><br>
                                            <strong><?php echo date("H:i", $_search_air_ve["ngay_den"]) ?></strong><!--, 24-11-2013-->
                                        </div>

                                        <div class="three">
                                            <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                            <span><?php
                                                $air = Air_Port::findAirLineById($_search_air_ve["airlines_id"]);
                                                foreach ($air as $_air) {
                                                    echo $_air["title"];
                                                }
                                                ?></span><br>
                                            <strong><?php echo $_search_air_ve["ma_may_bay"] ?></strong><br>
                                            <span>Loại vé: <strong><?php echo $_search_air_ve["loai_ve"] ?></strong></span>
                                        </div>
                                        <div class="clear" style="border-bottom:1px dashed #CCC; padding-bottom:5px; margin-bottom:5px;"></div>
                                        <table class="tb0 red" width="100%">
                                            <tbody><tr>
                                                    <td width="25%"><strong class="tlcl1">Loại hành khách</strong></td>
                                                    <td width="15%"><strong class="tlcl1">Số lượng vé</strong></td>
                                                    <td width="20%"><strong class="tlcl1">Giá mỗi vé</strong></td>
                                                    <td width="20%"><strong class="tlcl1">Thuế &amp; Phí mỗi vé</strong></td>
                                                    <td width="20%"><strong class="tlcl1">Tổng giá</strong></td>
                                                </tr>
                                                <tr>
                                                    <td>Người lớn</td>
                                                    <td><?php echo $_SESSION["nguoilon"] ?></td>
                                                    <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format($_search_air["phi_nguoi_lon"]) ?> VNĐ</strong></td>
                                                    <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["nguoilon"]) ?> VNĐ</strong></td>
                                                </tr>
                                                <?php if (isset($_SESSION["treem"]) && $_SESSION["treem"] > 0) { ?>
                                                    <tr>
                                                        <td>Trẻ em</td>
                                                        <td><?php echo $_SESSION["treem"] ?></td>
                                                        <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                                        <td><strong><?php echo number_format($_search_air["gia_ve_tre_em"]) ?> VNĐ</strong></td>
                                                        <td><strong><?php echo number_format(($_search_air["phi_tre_em"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["treem"]) ?> VNĐ</strong></td>
                                                    </tr>
                                                <?php } ?>
                                                <?php if (isset($_SESSION["embe"]) && $_SESSION["embe"] > 0) { ?>
                                                    <tr>
                                                        <td>Em bé</td>
                                                        <td><?php echo $_SESSION["embe"] ?></td>
                                                        <td><strong><?php echo number_format($_search_air["gia_ve_em_be"]) ?> VNĐ</strong></td>
                                                        <td><strong><?php echo number_format($_search_air["phi_em_be"]) ?> VNĐ</strong></td>
                                                        <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["embe"]) ?> VNĐ</strong></td>
                                                    </tr>
                                                <?php } ?>
                                            </tbody></table>
                                        <strong class="tlcl2">Điều kiện hành lý</strong>
                                        <?php
                                        $air = Air_Port::findAirLineById($_search_air_ve["airlines_id"]);
                                        foreach ($air as $_air) {
                                            ?>
                                            <table class="tb0" width="100%">
                                                <tbody><tr>
                                                        <td width="30%">Hành lý xách tay</td>
                                                        <td width="70%"><?php echo $_air["hanh_ly_xach_tay"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td>Hàng lý ký gửi</td>
                                                        <td>Vui lòng chọn ở bước sau.</td>
                                                    </tr>
                                                </tbody></table>
                                            <strong class="tlcl2">Điều kiện về vé</strong>
                                            <table width="100%" class="tb0">
                                                <tbody><tr>
                                                        <td width="30%">Hoàn Vé</td>
                                                        <td width="70%"><?php echo $_air["hoan_ve"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Đổi Tên Hành Khách</td>
                                                        <td width="70%"><?php echo $_air["doi_ten"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Đổi Hành Trình</td>
                                                        <td width="70%"><?php echo $_air["doi_hanh_trinh"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Đổi Ngày Giờ Chuyến Bay</td>
                                                        <td width="70%"><?php echo $_air["doi_ngay_gio"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Bảo lưu</td>
                                                        <td width="70%"><?php echo $_air["bao_luu"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Thời hạn thay đổi </td>
                                                        <td width="70%"><?php echo $_air["thoi_gian_doi"] ?></td>
                                                    </tr>
                                                    <tr>
                                                        <td width="30%">Thay đổi chuyến bay</td>
                                                        <td width="70%"><?php echo $_air["doi_chuyen_bay"] ?></td>
                                                    </tr>
                                                </tbody></table>
                                        <?php } ?>
                                    </div>
                                </div>
                            </div>    
                        <?php endforeach; ?>
                    <?php } ?>
                <?php } ?>
            <?php } else { ?>
                <?php
                $router = base64_decode($_GET["router"]);
                $air_search = Air_Port::findByLichBayAirCode($router);
                foreach ($air_search as $_search_air) :
                    ?>
                    <div class="sky_left_section">
                        <span style="color:#FF7B0F; margin-left:15px; font-weight:bold; font-size:20px">
                            <?php
                            $air_go = Air_Port::findAirportCodeId($_search_air["airport_code_go"]);
                            foreach ($air_go as $_air_go) {
                                ?>
                                <?php echo $_air_go["title"] ?>
                            <?php } ?>
                        </span> 
                        <span style="font-weight:bold; color:#666; font-size:16px;">đi</span> <span style="color:#FF7B0F; font-weight:bold; font-size:20px">
                            <?php
                            $air_to = Air_Port::findAirportCodeId($_search_air["airport_code_to"]);
                            foreach ($air_to as $_air_to) {
                                ?>
                                <?php echo $_air_to["title"] ?>
                            <?php } ?>
                        </span> <span class="dsb p5"></span>
                        <span style="font-weight:bold; margin-left:10px; color:#666; font-size:16px;">bay ngày</span> <span style="color:#143B85; font-size:20px; font-weight:bold;">
                            <?php echo date("d-m-Y", $_search_air["ngay_di"]); ?>
                        </span>
                        <span class="dsb p5"></span>
                        <div class="sky_schedule">
                            <div class="content">
                                <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                <span class="flight_code"><?php echo $_search_air["id"] ?></span>
                                <span class="time"><?php echo date("H:i", $_search_air["ngay_di"]) ?> - <?php echo date("H:i", $_search_air["ngay_den"]) ?></span>
                                <span class="price"><?php echo $_search_air["gia_ve_nguoi_lon"] ?> VNĐ</span>
                                <span class="detailt" id="view_detailt">Xem Chi Tiết</span>
                                <span class="chosen">
                                    <a <?php metroLink("searchinfo.php?id={$_search_air["id"]}") ?> title="Tiếp theo -&gt; xác nhận đơn hàng"><input type="radio" name="chosen"><span>Chọn</span></a>
                                </span>
                                <div class="clear"></div>
                            </div>
                            <div class="hide_content">
                                <div class="three">
                                    Từ <strong><?php echo $_air_go["title"] ?></strong>, Việt Nam<br>
                                    Sân Bay: <strong>
                                        <?php
                                        $air_g = Air_Port::findAirportByCodeId($_search_air["airport_code_go"]);
                                        foreach ($air_g as $_air_g) {
                                            echo $_air_g["title"];
                                        }
                                        ?></strong><br>
                                    <strong><?php echo date("H:i", $_search_air["ngay_di"]) ?></strong><!--, 24-11-2013-->
                                </div>

                                <div class="three">
                                    Tới <strong><?php echo $_air_to["title"] ?></strong>, Việt Nam<br>
                                    Sân Bay: <strong>
                                        <?php
                                        $air_t = Air_Port::findAirportByCodeId($_search_air["airport_code_to"]);
                                        foreach ($air_t as $_air_t) {
                                            echo $_air_t["title"];
                                        }
                                        ?></strong><br>
                                    <strong><?php echo date("H:i", $_search_air["ngay_den"]) ?></strong><!--, 24-11-2013-->
                                </div>

                                <div class="three">
                                    <img src="http://127.0.0.1/abay/public/uploads/logos/f7a5e8f5524d9b45db5af51dde490ff7.gif">
                                    <span><?php
                                        $air = Air_Port::findAirLineById($_search_air["airlines_id"]);
                                        foreach ($air as $_air) {
                                            echo $_air["title"];
                                        }
                                        ?></span><br>
                                    <strong><?php echo $_search_air["ma_may_bay"] ?></strong><br>
                                    <span>Loại vé: <strong><?php echo $_search_air["loai_ve"] ?></strong></span>
                                </div>
                                <div class="clear" style="border-bottom:1px dashed #CCC; padding-bottom:5px; margin-bottom:5px;"></div>
                                <table class="tb0 red" width="100%">
                                    <tbody><tr>
                                            <td width="25%"><strong class="tlcl1">Loại hành khách</strong></td>
                                            <td width="15%"><strong class="tlcl1">Số lượng vé</strong></td>
                                            <td width="20%"><strong class="tlcl1">Giá mỗi vé</strong></td>
                                            <td width="20%"><strong class="tlcl1">Thuế &amp; Phí mỗi vé</strong></td>
                                            <td width="20%"><strong class="tlcl1">Tổng giá</strong></td>
                                        </tr>
                                        <tr>
                                            <td>Người lớn</td>
                                            <td><?php echo $_SESSION["nguoilon"] ?></td>
                                            <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                            <td><strong><?php echo number_format($_search_air["phi_nguoi_lon"]) ?> VNĐ</strong></td>
                                            <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["nguoilon"]) ?> VNĐ</strong></td>
                                        </tr>
                                        <?php if (isset($_SESSION["treem"]) && $_SESSION["treem"] > 0) { ?>
                                            <tr>
                                                <td>Trẻ em</td>
                                                <td><?php echo $_SESSION["treem"] ?></td>
                                                <td><strong><?php echo number_format($_search_air["gia_ve_nguoi_lon"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format($_search_air["gia_ve_tre_em"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format(($_search_air["phi_tre_em"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["treem"]) ?> VNĐ</strong></td>
                                            </tr>
                                        <?php } ?>
                                        <?php if (isset($_SESSION["embe"]) && $_SESSION["embe"] > 0) { ?>
                                            <tr>
                                                <td>Em bé</td>
                                                <td><?php echo $_SESSION["embe"] ?></td>
                                                <td><strong><?php echo number_format($_search_air["gia_ve_em_be"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format($_search_air["phi_em_be"]) ?> VNĐ</strong></td>
                                                <td><strong><?php echo number_format(($_search_air["phi_nguoi_lon"] + $_search_air["gia_ve_nguoi_lon"]) * $_SESSION["embe"]) ?> VNĐ</strong></td>
                                            </tr>
                                        <?php } ?>
                                    </tbody></table>
                                <strong class="tlcl2">Điều kiện hành lý</strong>
                                <?php
                                $air = Air_Port::findAirLineById($_search_air["airlines_id"]);
                                foreach ($air as $_air) {
                                    ?>
                                    <table class="tb0" width="100%">
                                        <tbody><tr>
                                                <td width="30%">Hành lý xách tay</td>
                                                <td width="70%"><?php echo $_air["hanh_ly_xach_tay"] ?></td>
                                            </tr>
                                            <tr>
                                                <td>Hàng lý ký gửi</td>
                                                <td>Vui lòng chọn ở bước sau.</td>
                                            </tr>
                                        </tbody></table>
                                    <strong class="tlcl2">Điều kiện về vé</strong>
                                    <table width="100%" class="tb0">
                                        <tbody><tr>
                                                <td width="30%">Hoàn Vé</td>
                                                <td width="70%"><?php echo $_air["hoan_ve"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Đổi Tên Hành Khách</td>
                                                <td width="70%"><?php echo $_air["doi_ten"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Đổi Hành Trình</td>
                                                <td width="70%"><?php echo $_air["doi_hanh_trinh"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Đổi Ngày Giờ Chuyến Bay</td>
                                                <td width="70%"><?php echo $_air["doi_ngay_gio"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Bảo lưu</td>
                                                <td width="70%"><?php echo $_air["bao_luu"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Thời hạn thay đổi </td>
                                                <td width="70%"><?php echo $_air["thoi_gian_doi"] ?></td>
                                            </tr>
                                            <tr>
                                                <td width="30%">Thay đổi chuyến bay</td>
                                                <td width="70%"><?php echo $_air["doi_chuyen_bay"] ?></td>
                                            </tr>
                                        </tbody></table>
                                <?php } ?>
                            </div>
                        </div>
                    </div>    
                <?php endforeach; ?>
            <?php } ?>
        </div>
    </div>
    <div id="rightcontent">
        <?php require_once 'tpl/ticket/menu_right.php'; ?>
    </div>
    <div class="clearAll"></div>
    <ul class="listservice">
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dat-ve.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/thue-xe.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/datphong.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dulich.jpg" width="178" height="132" /></a></li>
        <li><a <?php metroLink("search.php") ?>><img src="img/banner/dichvu.jpg" width="178" height="132" /></a></li>
    </ul>
</div>

<div class="clear"></div>
<?php require_once 'tpl/ticket/footer.php'; ?>
